From: Jasper St. Pierre Date: Sat, 2 Nov 2013 21:55:48 +0000 (-0400) Subject: bluetooth: Parse pins starting with 0 correctly X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3105 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8bd7003ea7ae9a04ef2fae9f014093bb8da84092;p=gnome-shell.git bluetooth: Parse pins starting with 0 correctly If we have a numeric PIN that starts with 0, it will be treated as an octal number rather than a number that just starts with 0. --- diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index ce0aa0245..4b74b2396 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -228,7 +228,7 @@ const PinNotification = new Lang.Class({ _ok: function() { if (this._numeric) { - let num = parseInt(this._entry.text); + let num = parseInt(this._entry.text, 10); if (isNaN(num)) { // user reply was empty, or was invalid // cancel the operation